﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/admin/MasterPage.master"
    CodeFile="Default.aspx.cs" Inherits="admin_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<style type="text/css">
.grid{
	width:95%;
	margin:5px;
	margin-top:15px;
}

.grid th{
	height:35px;
	background:url(images/tb_header.gif) repeat-x;
	border-left:1px solid #fff;
	color:#FFFFFF;
	font-size:11px;
	font-weight:bold;
	text-align:center;
}

.grid td{
	height:auto;
	border-left:1px solid #fff;
	border-bottom:1px solid #fff;
	font-size:11px;
	background-color:#e8fbff;
	padding:2px;
	padding-left:7px;
	text-align:left;
}
.gridpager td{    
    color: #fff;   
    background:url(images/tb_header.gif) repeat-x; 
    font-weight: bold;
    text-decoration: none;
}
.gridpager td a
{
	font-size:11px;
    color: white;
    font-weight: bold;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <div class="title_content">
        <asp:Label ID="lblInfo" runat="server" Text="Danh Sách & Lịch Film"></asp:Label>
    </div>
    <div class="content_content">
        <center>
            <asp:Label ID="lblError" runat="server" Text=""></asp:Label>
            <asp:GridView ID="GridView1" CssClass="grid" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                CellPadding="4" DataKeyNames="FilmID" DataSourceID="SqlDataSource1" ForeColor="#333333"
                GridLines="None" PageSize="7" OnRowCommand="GridView1_RowCommand" OnRowDeleting="GridView1_RowDeleting"
                OnRowEditing="GridView1_RowEditing" OnDataBound="GridView1_DataBound" OnSelectedIndexChanging="GridView1_SelectedIndexChanging">
                
                <Columns>
                    <asp:CommandField ButtonType="Image" EditImageUrl="~/img/edit.png" ShowEditButton="True" />
                    <asp:CommandField ButtonType="Image" DeleteImageUrl="~/img/delete.png" ShowDeleteButton="True" />
                    <asp:BoundField DataField="NameVN" HeaderText="Tên Phim Việt" SortExpression="NameVN" />
                    <asp:BoundField DataField="NameEN" HeaderText="Tên Phim Anh" SortExpression="NameEN" />
                    <asp:BoundField DataField="Cinema" HeaderText="Rạp" SortExpression="Cinema" />
                    <asp:BoundField DataField="TimeShow1" HeaderText="Suất 1" SortExpression="TimeShow1" />
                    <asp:BoundField DataField="TimeShow2" HeaderText="Suất 2" SortExpression="TimeShow2" />
                    <asp:BoundField DataField="TimeShow3" HeaderText="Suất 3" SortExpression="TimeShow3" />
                    <asp:BoundField DataField="TimeShow4" HeaderText="Suất 4" SortExpression="TimeShow4" />
                    <asp:BoundField DataField="TimeShow5" HeaderText="Suất 5" SortExpression="TimeShow5" />
                    <asp:BoundField DataField="TimeShow6" HeaderText="Suất 6" SortExpression="TimeShow6" />
                    <asp:BoundField DataField="TimeShow7" HeaderText="Suất 7" SortExpression="TimeShow7" />
                    <asp:BoundField DataField="TimeShow8" HeaderText="Suất 8" SortExpression="TimeShow8" />
                    <asp:BoundField DataField="DateShow" HeaderText="Ngày" SortExpression="DateShow" />
                    <asp:BoundField DataField="FilmID" HeaderText="Id" ReadOnly="True" SortExpression="FilmID" />
                </Columns>
                <FooterStyle BackColor="#990000" Font-Bold="True" ForeColor="White" />
                <PagerStyle cssClass="gridpager" HorizontalAlign="Center" />  
                <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                <HeaderStyle Font-Bold="True" ForeColor="White"  />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:cinemaconnection.Properties.Settings.cinemaConnectionString %>"
                SelectCommand="SELECT DISTINCT * FROM [Film] order by DateShow" DeleteCommand="DELETE FROM Film WHERE (FilmID = @FilmId)">
            </asp:SqlDataSource>
         </center>
         <br clear="all" />
</asp:Content>
